using System.Collections.Generic;
using Caliburn.Core.Metadata;
using Caliburn.PresentationFramework.ApplicationModel;
using Cirrostrata.CycleList.CaliburnTest.Infrastructure;
using Cirrostrata.CycleList.CaliburnTest.Model;

namespace Cirrostrata.CycleList.CaliburnTest.Presenters
{
    [PerRequest(typeof(IComplexPresenter))]
    public class ComplexPresenter : Presenter, IComplexPresenter
    {
        private readonly IShellPresenter _shellPresenter;
        public IList<Equipment> AllEquipment { get; set;}

        public ComplexPresenter(IShellPresenter shellPresenter)
        {
            _shellPresenter = shellPresenter;

            AllEquipment = new List<Equipment>
                               {
                                   new Equipment("Guitar", EquipmentStatus.BrandNew),
                                   new Equipment("Amp", EquipmentStatus.BrandNew),
                                   new Equipment("Cables", EquipmentStatus.BrandNew),
                                   new Equipment("Keyboard", EquipmentStatus.BrandNew),
                                   new Equipment("Drums", EquipmentStatus.BrandNew)
                               };
        }

        public void SwitchToSimple()
        {
            _shellPresenter.Open<ISimplePresenter>();
        }
    }
}